<template>
    <div class="account-order-info">
        <div class="container">
            <div class="row">
                <div id="content" class="col-sm-12">
                    <div class="nav-bar">历史订单</div>

                    <div class="row widget">
                        <div class="col-xs-12">
                            <div class="list-two-column-justified">
                                <dl>
                                    <dt>订单编号：</dt>
                                    <dd>#658</dd>
                                </dl>
                                <dl>
                                    <dt>订单日期：</dt>
                                    <dd>2018-09-24 17:04:26</dd>
                                </dl>
                                <dl>
                                    <dt>付款方式：</dt>
                                    <dd>支付宝</dd>
                                </dl>
                                <dl>
                                    <dt>配送方式：</dt>
                                    <dd>免费配送</dd>
                                </dl>
                            </div>
                        </div>
                    </div>
                    <div class="row widget">
                        <div class="col-sm-12">
                            <strong>配送地址</strong> <br>
                            cloud (12312312312)<br>上海市市辖区徐汇区sdadasd<br>123123
                        </div>
                    </div>
                    <div class="row widget">
                        <div class="col-xs-12">
                            <div id="checkout-payment" class="clearfix"><form id="alipaysubmit" name="alipaysubmit" action="https://openapi.alipay.com/gateway.do" method="POST">
                                <input type="hidden" name="biz_content" value="{&quot;body&quot;:&quot;&quot;,&quot;subject&quot;:&quot;Beats EP 头戴式耳机有线重低音耳麦通用b耳机;B-amp;O BeoPlay P2  (多子产品演示)无线蓝牙便携小音箱 丹麦bo迷你户外运动口袋音响&quot;,&quot;total_amount&quot;:&quot;123&quot;,&quot;out_trade_no&quot;:&quot;658-1552551880&quot;,&quot;product_code&quot;:&quot;FAST_INSTANT_TRADE_PAY&quot;}">
                                <input type="hidden" name="app_id" value="2017070507654660">
                                <input type="hidden" name="version" value="1.0">
                                <input type="hidden" name="format" value="json">
                                <input type="hidden" name="sign_type" value="RSA2">
                                <input type="hidden" name="method" value="alipay.trade.wap.pay">
                                <input type="hidden" name="timestamp" value="2019-03-14 08:24:40">
                                <input type="hidden" name="alipay_sdk" value="alipay-sdk-php-20161101">
                                <input type="hidden" name="notify_url" value="https://mall.opencart.cn/payment_callback/alipay">
                                <input type="hidden" name="return_url" value="https://mall.opencart.cn/index.php?route=checkout/success">
                                <input type="hidden" name="charset" value="UTF-8">
                                <input type="hidden" name="gateway_url" value="https://openapi.alipay.com/gateway.do">
                                <input type="hidden" name="sign" value="cUJgaA+1llmQ0HzA2LjlKt5Na2uhENdGxEpgW7Xq9S/QPtw4OF9BP2sSJ0yfTtXTHKKJgJz5J+JGq5eLSjJWuaDdGeeOf5rgJY/hOZ8+UOt/dWX860f4WY5BWlEuqJ7XS2SU0Sq36l4VWaT1d9DqrHquoztpAlXjzQNG2N/LH5caWvBg3/a7dIvRgOH3IBBrwnnPBOikaZ5DUcHL1Mk//iSJNinyRQ7xfS6C72FBWavQhRhSJOHbidnbR83m+odQO6nRQZcGa6s8tcGcTTUuitLbW/nFV3JqptwHqfp0jeBl7QlWGmjeDQLZhWT4C/5Lc4IcyIZ+p+W8bP20utSv7A==">
                            </form>
                                <div class="buttons">
                                    <div class="pull-right">
                                        <input type="button" value="继续付款" id="button-confirm" class="btn btn-primary">
                                    </div>
                                </div>

                                <script>
                                    var btn = document.querySelector("#button-confirm");
                                    btn.addEventListener("click", function (e) {
                                        e.preventDefault();
                                        e.stopPropagation();
                                        e.stopImmediatePropagation();

                                        var queryParam = '';
                                        Array.prototype.slice.call(document.querySelectorAll("#alipaysubmit input[type=hidden]")).forEach(function (ele) {
                                            queryParam += '&' + ele.name + "=" + encodeURIComponent(ele.value);
                                        });
                                        var gotoUrl = document.querySelector("#alipaysubmit").getAttribute('action') + '?' + queryParam;
                                        location.href = "https://mall.opencart.cn/index.php?route=extension/payment/alipay/pay" + "&goto=" + _AP.pay(gotoUrl);

                                        return false;
                                    }, false);
                                </script>
                            </div>
                        </div>
                    </div>
                    <div class="row widget">
                        <div class="col-xs-12">
                            <div class="product-item">
                                <div class="image"><img src="https://mall.opencart.cn/image/cache/placeholder-100x100.png" alt="Beats EP 头戴式耳机有线重低音耳麦通用b耳机" class="img-responsive"></div>
                                <div class="info">
                                    <div class="name"><a href="https://mall.opencart.cn/index.php?route=product/product&amp;product_id=33">Beats EP 头戴式耳机有线重低音耳麦通用b耳机</a></div>
                                    <div class="data">
                                        <div class="model"><b>型号</b>: Product 6</div>
                                        <div class="total">￥99.00 x 1 = <strong>￥99.00</strong></div>
                                    </div>
                                    <div class="action pull-right">
                                        <a href="https://mall.opencart.cn/index.php?route=account/order/reorder&amp;order_id=658&amp;order_product_id=794" class="btn btn-default">再次购买</a>
                                    </div>
                                </div>
                            </div>
                            <div class="product-item">
                                <div class="image"><img src="https://mall.opencart.cn/image/cache/placeholder-100x100.png" alt="B&amp;O BeoPlay P2  (多子产品演示)无线蓝牙便携小音箱 丹麦bo迷你户外运动口袋音响" class="img-responsive"></div>
                                <div class="info">
                                    <div class="name"><a href="https://mall.opencart.cn/index.php?route=product/product&amp;product_id=46">B&amp;O BeoPlay P2  (多子产品演示)无线蓝牙便携小音箱 丹麦bo迷你户外运动口袋音响</a></div>
                                    <div class="option">
                                        &nbsp;尺寸: 大号
                                        &nbsp;颜色: 朱红色
                                    </div>
                                    <div class="data">
                                        <div class="model"><b>型号</b>: Product 19</div>
                                        <div class="total">￥8.00 x 3 = <strong>￥24.00</strong></div>
                                    </div>
                                    <div class="action pull-right">
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row widget">
                        <div class="col-xs-12">
                            <div class="list-two-column-justified">
                                <dl>
                                    <dt>商品总额</dt>
                                    <dd>￥123.00</dd>
                                </dl>
                                <dl>
                                    <dt>免费配送</dt>
                                    <dd>￥0.00</dd>
                                </dl>
                                <dl>
                                    <dt>订单总额</dt>
                                    <dd>￥123.00</dd>
                                </dl>
                            </div>
                        </div>
                    </div>
                    <div class="row widget">
                        <h2>订单记录</h2>
                        <div class="col-xs-12">
                            <div class="list-two-column-justified">
                                <dl><dt>订单日期</dt><dd>2018-09-24 17:04:27</dd></dl>
                                <dl><dt>订单状态</dt><dd>待付款</dd></dl>
                            </div>
                        </div>
                    </div>
                    <!-- .buttons.clearfix is required to display shipping tracking block from vqmod -->
                    <div class="buttons clearfix"></div>
                </div>
            </div>
        </div>
    </div>

</template>

<script>
    export default {
        name: "account_order_info",

        data:function(){

            order_id:0
        },

        methods:{

            order_info:function(){

                var url = this.config.web_url + '?r=checkout/order/info';
                url += '?order_id=' + this.order_id;
                this.axios.get( url ).then(function( res ){



                });
            }

        },

        created:function(){

            this.order_id = this.$route.params.order_id;
        }
    }
</script>

<style scoped>

</style>